import { defineStore } from "pinia";

export const useUserStore = defineStore('user', {
  state: () => {
    return {
      // 用户登录后的基本信息的保存
      userInfo: {
        id: 1,
        avatarUrl: '',
        name: null,
        level: 0,
        accountBalance: 9999,
        starGameId: []
      },
      // 用户将要购买的游戏
      placeOrder: [],
      // 收货地址
      receivingAddress: [{
        id: '1',
        name: 'Tester',
        tel: '17628439829',
        address: '四川省宜宾市翠屏区戎州路东段13号',
        isDefault: true,
      },
      {
        id: '2',
        name: '白黎许',
        tel: '1310000000',
        address: '四川省成都市都江堰市成都东软学院',
      }]
    }
  }
})